package com.example.framework.job;

import org.quartz.*;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @Author 王鹤蒲
 * @Date 2023 11 21
 */

@Component
@DisallowConcurrentExecution
@PersistJobDataAfterExecution
public class TestJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("任务开始执行"+ LocalDateTime.now());

        System.out.println("任务执行结束"+ LocalDateTime.now());
    }
}
